package com.example.demo.designPatternsTest;

/**
 * @author lilinchun
 * @date 2023/5/22 0022 18:14

 * 定义五菱汽车的装饰器类
 **/
public abstract class WulingDecorate extends WulingNewEngeryCar {
    //私有的对象
    private WulingNewEngeryCar wulingNewEngeryCar;

    //公共的构造函数
    public WulingDecorate(WulingNewEngeryCar wulingNewEngeryCar) {
        this.wulingNewEngeryCar = wulingNewEngeryCar;
    }

    //重写汽车的能力
    @Override
    void run() {
        wulingNewEngeryCar.run();
    }
}